#include "diag_engine.h"

static llvm::SourceMgr::DiagKind diag_kind[] = 
{
    #define DIAG(ID, KIND, MSG) llvm::SourceMgr::DK_##KIND,
    #include "diag.inc"
};

static const char* diag_msg[] = 
{
    #define DIAG(ID, KIND, MSG) MSG,
    #include "diag.inc"
};

llvm::SourceMgr::DiagKind DiagEngine::GetDiagKind(unsigned id)
{
    return diag_kind[id];
}

const char* DiagEngine::GetDiagMsg(unsigned id)
{
    return diag_msg[id];
}